package com.example.mapper;

import com.example.entity.Admin;
import com.example.entity.Patients;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 操作Patients相关数据接口
*/
@Mapper
public interface PatientsMapper {

    /**
      * 新增
    */
    int insert(Patients Patients);

    /**
      * 删除
    */
    int deleteById(Integer id);

    /**
      * 修改
    */
    int updateById(Patients Patients);

    /**
      * 根据ID查询
    */
    Patients selectById(Integer id);

    /**
      * 查询所有
    */
    List<Patients> selectAll(Patients Patients);

    @Select("select * from patients where username = #{username}")
    Patients selectByUsername(String username);

}